class Person:
    def __init__(self, name=None):
        self.name=name
    def goto(self,position,vehicle):
        print(self.name,"去",position)
        vehicle.run()

class Car:
    def run(self):
        print("汽车嘟嘟嘟在开...")

class Plane:
    def run(self):
        print("飞机嗡嗡嗡的在飞...")

p1 = Person("小明")
car1=Car()
plane1=Plane()
p1.goto("东北",car1)
p1.goto("西南",plane1)